package 策略模式.简单工厂模式加策略模式;

/**
 * 文 件 名 称：Discount.
 * 文 件 说 明：打折
 * 创   建   人：zpen.
 * 创 建 时 间：2018/5/3 16:06.
 */
public class Discount implements Payment {
    private Integer total;

    private Double discount;

    public Discount() {
    }

    public Discount(Integer total, Double discount) {
        this.total = total;
        this.discount = discount;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    @Override
    public Double getTotals(){
        return getTotal()*getDiscount();
    }
}
